package com.vcourse.service.api.user.feign;

import com.vcourse.commons.result.R;
import com.vcourse.service.api.user.feign.fallback.MemberServiceFallBack;
import com.vcourse.service.base.dto.MemberDto;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

/**
 * @author Zengsh123
 * @date 2020-06-13 14:52
 */
@Service
@FeignClient(value = "vcourse-user", fallback = MemberServiceFallBack.class)
public interface MemberService {

    @ApiOperation("根据会员id查询会员信息")
    @GetMapping("/api/ucenter/user/inner/get-member-dto/{memberId}")
    MemberDto getMemberDtoByMemberId(
            @ApiParam(value = "会员ID", required = true)
            @PathVariable String memberId);

    @ApiOperation("统计某天用户注册人数")
    @GetMapping("/admin/ucenter/user/count-registry-num/{day}")
    R countRegistryNum(@ApiParam("日期") @PathVariable String day);
}
